Fixing template related issues
Merge pull request #848 from lingalamadhukar/bug_fixes

Fixing template related issues