Put the hooks in the right execution path!!
Merge pull request #9 from piojo/fix-hooks

Put the hooks in the right execution path!!