Fix errors in commit hooks and synch snippets