restored changes that broke conversion from String to StringBuffer