Index count fix