Hopefully fixed hooking bug. Simplified the hooking logic a little
merge commit