Fix crasher bug when attempting to show the active window before it is created