Added better version checking.