Backport fixes