Updated from commit c6ee9ac0340f25d92a3c22459dedf9f3186a2591.