fixed sorting

sorting was backwards, now it should work