Fixed a issue: sub template can't get context from parent