Update variant usage to match the latest API