Fix some unnecessary calls to the API.