fix set_previous_next