fixes close dialog