Improve version check.