fix a bug in cache error