fix error when the query reaches the limit
minor fix