Don't use StringBuilder.deleteCharAt to remove last char, close #313