Shouldn't it be GEOSEARCH_FREQ_LIMIT instead of hard-coded 5000?