Fix array layout