fix encoding for frozen keys