v3: improve assert