Fixed the window shrinking