Fix window sizing bug