Fix json response handler