Correct the timing of window creation.

This was only intended to happen after launching has finished.