Fix next with filter bug