Fix window size computation.