fixed some bugs related to list parsing