fix cryptic invariant violation