fix the old style template generation