More fixes and tweaks