Fix code example after API change.