fixing resizing and such