handles bad json, closes #13