more fixes and tweaks