fix it so JSON and XML both generate the right results