Updated from commit 3e9484632efaab95286c9b0db994bd57ed64ba07.