fix bug with name of template getting set by sub classes