Added an error controller.