Updated from commit a0216473d51df38e8df31be13d7d7a131d98fe2d.