Fix buffer usage bug.
Merge pull request #220 from SirVer/fix_visualization

Fix buffer usage bug.