Fixed encoding for new buffer