Imported changes from us4. Should not negatively impact other sites.