closes #1326
Better sort generics.
Merge branch 'origin/master'