some random fixes and tweaks