added missing initialization of _cntRef in Template constructor