fix 404 caused 500 bug