Fix problem with udc
diff --git a/ebtables.c b/ebtables.c
index f4225de..8b0dd80 100644
--- a/ebtables.c
+++ b/ebtables.c
@@ -601,7 +601,7 @@
 				if ((replace.selected_chain =
 				     ebt_get_chainnr(&replace, opt)) == -1)
 					ebt_print_error("Chain %s doesn't "
-							"exist", optarg);
+							"exist", opt);
 				ebt_delete_chain(&replace);
 				break;
 			}
diff --git a/libebtc.c b/libebtc.c
index a4232fd..dfc277b 100644
--- a/libebtc.c
+++ b/libebtc.c
@@ -1067,7 +1067,7 @@
 		decrease_chain_jumps(replace);
 		ebt_flush_chains(replace);
 		remove_udc(replace);
-	} while (chain_nr != -1);
+	} while (chain_nr == -1);
 	replace->selected_chain = chain_nr;
 }