fix index count