fix major bug - template instance