Fixed a race in complete_async_op.