small refactoring in local_server_dialog