Fix bug in random_link_changes