#21: correct resizing behaviour, even when variables are added