refactor customfilters to make remove buttons works on firefox