Legacy sort inverted asc/desc

Signed-off-by: nixnodes <code@eth.si>