Fix bug where buffer was not initialized with empty string.