fix error routes