Fix invariant violation