Fixed type error from peerId being used as a dict key.