Fixed a customfilter bugs. Tested locally on Jan 19, 2014