Somehow, my code is failing to insert into array a number.