Changed the way WindowStates work