fixed problem when filtering results