Fixed scope of controller in template.