Fix issue when removing all segments
Merge pull request #6 from MartinMoizard/master

Fix issue when removing all segments