some fixes in charWidth