fix char bugs