More bugfixing