fixing the window size bug