Fix to template engine
Merge remote-tracking branch 'upstream/master'