Bug fixing change index array to lower