Fixed resizing of windows, other tweak