Better handling of invalidation