Simplified bufferToString fix