buffer is now keeping the correct size when scrolling. Fixes #45