bug fix for selecting tab that is already selected when the add button is pressed