bugfix: remember the last buffer size correctly when target buffer was too small...