fix route 500 bug