Updated reset code