fixed possible deadlock in checkin_and_destroy