Fixed a pointer dereference error, and modified the header of the reset method