minor enhancements and bug fixes