Fix runtime error of treating arrays as hashes.