Ported to 3.14.