Update reset function

Fix reset bug.
commiting Justin's changes