Fixed bug in the reset code.

Signed-off-by: Seb Lee-Delisle <sebleedelisle@gmail.com>