Fix for an IE bug with the template test