Shorted window switch code