delete unnecessary dialog