Improved version checking.