Improve tab switching in compare mode