Fix bug in order to add more patterns