fix error controller