Fix index type