logic fix for installing keys.