Fix issue with decoding the JSON data from client