fixed bugs

Previous I thought we needed two separately buffer, but one buffer is
fine.