Did you refresh the array which hold the code?

What happen when you remove the power and reconnect it? Is the new code works?

With the whole code, it will be easier so far..