fix the custom filter bug in filter.js