fix some potential problems with pre-commit git hook