Fixed mutable array problem