fix encryption error