some bug fix error routes