Fix bug where we got empty json objects for large result sets.