fix Windows bugs