Fix some assertions

Assertion fix