some minor fixes and enhancements