fix orphan bug