Fix template update, clone and instantiate