Fix some problems related to highlighting, but not enough to make it work.