minor bug fixes and enhancements.