fixed sorting by numerical value of inner_order instead of alphabetical