bugfix: built-in hook functions were not called

registerHook: we need to inject built-in callbacks into array in all
modes