Prevent going out of hooks.