fix the out-of-index bug in analysis/view