replaced template selector on edit template as well