Fix order of simulator code on windows