fix assertion error