fix bugs on Windwos