Fix bugs with state highlighting logic. Highlight background in addition
to borders.