fix template to use new complex data types if given