fixed bug that throws StringIndexOutOfBoundsException
Merge pull request #281 from igal-getrailo/minor-bug-001

fixed bug that throws StringIndexOutOfBoundsException