add end block for template
both modified
both modified error fixed