ensure that template is cleared, if module is cleared