fixes for char frequency