Fix result fetching for large queries. Fixes #26.