Updated version check logic.