fix caching and PHP notices
Merge pull request #30 from zbtirrell/master

fix caching and PHP notices