Fix 'query limit exceed' error case