fix an assertion error for fixing the previous bug