fix json output for download