Update variant usage to the latest API