Updated from commit 1d6000213caac2286367392e45af3229b4378e79.