bug fix: StringIndexOutOfBoundsException: String index out of range: 3