Fix calling legacy API.