fix js sorting