fixed dialogs for network discovery
refactoring