A few more bugs and tweaks