fix bug of window size