fixes critical bug in list