Fix assert logic.