Fix array detection