I don't think you need this array to keep track of the id. Just keep it in a local variable in ``dispatch`` when generating it the first time, to be able to assign again the second time