[FOLD] Check detach flag in handler