fix a bug in add-list