Fixed a bug where unencrypted files would crash it.