Fix index parsing