fixed list index issue