misc fixes and tweaks