fix bugs in windows