Minor update to doTemplate