Bug fixes and enhancements after merge