Fix assertion error line 418