fix key invalidation test