one-line js fix for sorting