This commit fixes various list-related bugs.