Fixed issues in SegmentSet

Many (unofficial) SegmentSet demos out there weren't working with the latest builds (since 4.1.1 I believe).
Looked into it and fixed a few bugs.