Fixed a minor template bug