Got rid of out of index bug