Fix for key gen. on Mac