fixed various issues for windows builds