Change 'Cancel' button behaviour