Fixed bug with sort_order

Signed-off-by: Malte Sussdorff <malte.sussdorff@cognovis.com>