fixed assertion error