Small fixes and enhancements