fixed deprecated StringBuffer methods