[Backport] Fixes collated from elsewhere. Thanks CM