Fixes issue with key generation.