Fixed a wrong json decoding error detection.