A few more bugs fixed