misc fixes and enhancements