fix encrypted key