Fixed bugs in sort