deal with assert
scripted update of code from master at 10131b7 deal with assert