Couple of enhancements and bug fixes