fixed minor bug in ordering transformation