Forward port of  #6570 and #6637 to 73x