fix control encoding