fix expression so it applies filter first