fix select sort bug