Thanks for the tip! Although they are no local variables it works fine and I had absolutely no issues until now. The array is working and all bugs are gone now.