included upstream as 7.4.497