Backports for 0.8.12