Updated from commit 6df42052b031891005d0d7b7aaa4d84b2e4f3341.