Fix array merging