fix a error and return a proper 404