fix wrong assert()