Bugfixes in pre-commit