Fixed a bug with a errorDialog