A couple minor fixes before I gut the template handler.