Fix version check logic.