Fix the call of the hook scripts