The loading message was forcing the app to close when dialog.Close() happened