Fix StringBuffer usage