better arch and os ver detection/fix