fix updateMaxID and remove self-self routing