Minior bugfixes