fix templates cloning