Fix server response bugs

The response from the server is not in a standard JSON format. Bug
fixed.