fix on_peer_modified method