if this works, you shouldn't even need to clear the _pending list (in flush)