Fix error: cannot borrow immutable field as mutable