few small fixes and enhancements