Fix Some Bugs In Windows Environment