fix encryption cherry pick