Fixed an issue when items are removed from the cache