fix putEncrypted