bugs fixed
Merge pull request #137 from ShunkevichDV/master

bugs fixed in pattern search agent