Fixed bug in caching items