Fix index problem