Updated from commit 2c975d36424c4d04e998f8f8b1633ad56ed9476a.