Fix array dereferencing