small fixes and enhancements