fix caching and PHP notices