improved sectionname detection