fix creation of sections array