fix new peer object
check id is valid
update dist. thanks @lovebear