Smal bugfixing