fixed crash when entering generate keys