fix so that cache invalidation works