Cherry pick from cloudfoundry/common