two bug fix on windows