updated from upstream: 263bc242b025553c54a5d1d926386b5ecebfc807