backport fixes