Bugfix: fix growing buffer