fixed bug for more than 9 indexes