ugtrain: show the object index in printing old val
ugtrain: fix segfault when removing old values