Deal with JSON parse errors #511