Added confirm dialog on leaving unsaved changes