fix for cache clear (when state changes)