fix for mode indicator and history-highlighting