4.4 backports

Same as #729 , but aiming at branch 4.4