partially solved window resizing (gui must still be updated)