fix failed assertion caught by #1157 fix