Fixed bug where error message was displaying about the template even when it was correct