fix error closing dialog after validate cancelled the event