improved arch detection and windows vars