Fix generateHookCaller functions