Fixed Sorting Javascript