Fix bugs in list