update rs_index.cc to fix the bug for parameter passing