fix a bug in ANDed filtering