small code change in list delete