Fix assert conditions