Fixed bug that prevented user from cancelling a loading dialog.