fix stupid index bug