fixed a bug about otp regeneration