fixing bug in pattern/filters