[Issue #1] Fixing crashes if number of sections = 0