few fixes and tweaks