fix assertionerror from #6132