Fix: wrong usage of reduce function in sorting order_items.