Fixed stubborn window switching bug.