bugfix in caching