Bugfixes (code quality)