141223-iss001: modify function grid_get_index