Some bugs and hacks