fix pattern filter