Fix bugs with array resolution.