fix some bugs with latest appveyor