Detach correctly so there is no need to panic during reattach.