fix char mapping