fix certain issues with widget visibility conditions and static pages

should fix #107
Merge pull request #130 from mattoperry/widget-visibility-bugfix

fix certain issues with widget visibility conditions and static pages