Fixed compilation bug in windows and python