Corrected bug in clearToken()