fix bugs for {{#.}} and {{#this}}