fixed resizing clearing the wrong buttons.