Fixed the method used to invoke hooks.

The status of the hooks are ignored currently.