some more fixes and tweaks