fixed list out of range error