Bugfix sort for exact sizing