Fix Issue #322. block name includes prev text by mistake
Improve code for issue #322.
Merge pull request #323 from rragan/master

Fix Issue #322. block name in template includes previous text by mistake