Fixing one time password thread crash