* added support for --def unsorted=y
* fix condition