fix sort bug
Merge pull request #167 from kaku87/fixbug

fix sort bug
Fixed #148