Use better version detection