a few minor fixes and tweaks