I had a similar problem, when recreating the dialogs, the elements in the old dialogue did not seem to be destroyed.
the solution is to erase the contents of the dialog when closing:
$("<div>someelements</div>").dialog({ title:"sometitle", close: function() {$(this).html("");} })
source share