Fix wrong adapter assignment

We need to set adapter_template_name to nil at the end of the adapter block