bug fixes, minor enhancements