Fix closing inner lists.