fix select mode bug