Corrected filtering logic.