Fix filter bug introduced during refactor