fix #687: template indexes in logging statements