Fixed the window value passing issue