invalidate only what's needed