Fixes to mirror encryption support