Fix loading dialog when connectd to server.