Updated from commit a7809985abeb579ae62adf904a39d8e35462d141.