fix some bugs in window OS