Fixed a bug for empty response for json