Only call markDone when we're really done.