Updated from commit 435fd06bc6195eef7d6e389daeca53b1dacae6c3.