Fix some problem with highlighting in Firefox and one other bug that could be related to #219.