Fixed issue with final page.

Switched to apply-templates instead of call-template. Removed braces and single quotes around variable test