fixed track by index problem