Last chunk of backports for 0.8 from MoPad