made changes also in error controller