Fixing the hook snippet