fix json response ordering for 404, pep8 comment