Fix a bug with the tabWidget when updating the active tab