partial revert of aa7e6d6dd1697e for windows