fix segfault if encryption is undefined