Fixed a bug in getting the template