fix some bug for windows