Port of changes from HP