fix bugs in win version