Fixed bad window's resizing