Bug fixes and security improvements
