handle some scenarios where you mix delete() and deleteLater()