added stability to shut "editing dialog"