Updated from commit 2c45f43ca2f19a7e84f28a03d10747546eaed6c1.