Fix resizing bug and TableFlipException