Fixed bug when properly formed JSON is used