Bug correction in pre-commit script