Fix infinite loop with filters