Fix dialog and fragment connectivity