Template bug fixes related to HTTPS. (v3.2.2)