Fix a subsection iteration bug