fixing layout/page context issue from #424
Merge pull request #428 from doowb/master

fixing layout/page context issue from #424