fix encryption context