fix error with bad json