Updated from commit 984195f9768e685cc099691384983048f9e4c9c4.