Progress bar: Fix javascript array sort

sort() method does not work for integers natively, it needs a defined
function (which is sort of absurd).  This only worked by accident before.