fix bug(initiate pattern)