Fixes for Sorting