fix assertionerror from #6132
cleanup
merge from 1.2