fix and add test
Merge pull request #2 from sonots/fix_for_onepath

fixed for no section case