fixed crashing when start generating key when generating key already in progress