fixed errors under windows