Fixing renderTemplate issue.