bug fixes and minor doc enhancements