fixing the json output.