Looks like you're overstepping your variables boundary. Do a check on the array indices for each array variable that you write. Maybe you're writing more than it can hold and it overwrites the following variable. Variable in point is Num[13] in this case.