Update rs_select.cc

Fixed a bug