fix index referred array len problem