Fix mutating an immutable array