re-added invariant check flag