fix: scan for patterns correctly
performance: don't analise patterns that are too big