fixed issue with editing the size of a dict while processing it