Fixed the json decoding method