Fix template encoding

Regressed in bd66030e1cba32c4b7221691bdfebe93b408de5d

Closes #13.