Fix index tracking