A few small fixes and tweaks