Fixed startup problems on windows