Fix index error in last commit