fix no random key bug