fix comparison for cache