Fixed array dereferencing issue