cleanup checking for no template