Fix to avoid changing pointer in struct.