Some little bugfixes