Apply 3.2 fix to 3.x  #1557