fixed compatability issue between template and non-template systems