fix char limit bug