Corrected version check logic.