Fix character position counting and print out results.