fixes #1373
Merge pull request #1482 from craigh/hookfix

fixes #1373