fix bug for indexe