Checking validity of reset code, closes #29