Fix dialog tabs

The previous code breaks the dialogs tabs.