Fix js sorting