Fix some warnings introduced by the async API.