Fix bug with changing tab labels