Ending ListSets XML too early, fix some notices.