small fixes and tweaks