Sorting Bug Fixes