Fix usedAuthCode deletion

According to Stof's coments
Fix test error