- backport fixes from @rchl