Fix some filter bugs