Fix resizing to work when table is switched in and out of view