Fixed gen_orderings