Fixed window initialization on Windows.