total_results can sometimes be wrong. extra check is needed