fix the cache bug