added sanity check around the UI_template instance so that it ccan fail ...

...gracefully when not there.