Cancel button on dialog
reformat code