minor change in handleJSONErr