fix window size initialization bug