Improved version checking