close dialog when no id found