fix index bug on cli