important fix to update_peer