More fixes towards getting seamlessly generating keys.