fix lookup in template