Corrected buf.toString