fix pattern not defined