3-tier template bug fix --- output