fix template generation for import