fixed NPE on windows