fixed buffer to string conversion