Move helper conditional into selector
Resolve templates on restore