Updated from commit c0b5be99445a50f83f2282ef2dbd3fe08912eb30.