fixed some bugs in the char breakdown