fixed some assignment bugs in list.c