performance fix when filtering by expansion