Fix close dialog