Bugfixing galore