Fix concatenating buffer