fix filter bugs when using jquery