fixed bug in sort on use of bcf_cmp()