Some little bugfixing