Fixed #311.
fix typo.
Add template::instantiate. #298