Fix hooks bug