Fix resizing (broken in last commit).