fixed a number of weird resizing issues