fix a bug of sort table