fixed lib bug in template global object def.