fix bugs when build on win