fix KWIC formatting issues