fix buffer to string