minor fixes and tweaks