Added ErrorDialog back in