Corrected buffer to string