Your loop uses `krn` as the loop variable. This is also the name of the array that you loop over. The shell does not maintain separate name spaces for array variables and not-array variables. 

For each iteration, `krn` will be set to the current value from the array. This has the effect of modifying the array's first element in every iteration. The loop modifies the array so that the first element will be a copy of the last element after the end of the loop. 

To correct this, choose another name for the loop variable, or for the array.