Bugfix in caching