Fix some JSON generation