Fix row_index bug when params[:page] does not exist in Location History