Used wrong function for calling the hook