fixed character counting