Updated from commit e702832e808c35fc3879d7186085674eabb0a2ab.