Fix some bugs with windows
the change