actually fix json generation