Fixed sorting bugs
Removed debug
Merge pull request #24 from RWOverdijk/hotfix/sorting

Fixed sorting bugs