Fixes for encryption/decryption migrations