Fixed bug which causes a crash if json not returned from server