fixup: do not detach if not attached