Fixed oops if an uninitialized key is used for encryption.