More fixes and enhancements