Fixing "timeout reading remaining results" bug