fix the section detection logic a bit