fix a ugly bug under windows