fixed encoding of buffer