Minor bugfixing