Fixes and backports.