corrected for mswin