repair modal dialog