Fix the incorrect entries number when filtering