Updated from commit efe72c86fa397403fd438ab1399ee95f103071be.