fix character highlighting and tests