Foreman backport

Backports necessary for Foreman installer.