diff --git a/javascript/linkfield.js b/javascript/linkfield.js
index <HASH>..<HASH> 100644
--- a/javascript/linkfield.js
+++ b/javascript/linkfield.js
@@ -63,7 +63,7 @@ jQuery.entwine("linkfield", function($) {
 			});
 		},
 		onunmatch: function () {
-			$('.linkfield-dialog').remove();
+            $('.linkfield-dialog.ui-dialog-content').remove();
 		},
 		showDialog: function(url) {
 			var dlg = this.getDialog();
remove only dialog box/es have been created (don't remove .linkfield-dialog div which is not a dialog box)