Fixed the "java.lang.StringIndexOutOfBoundsException: String index out of range: -1" exception.
Authored by: eagleigor 2013-12-19
Parent: [r7608]
Child: [r7610]