Updated from commit 4ea84c484331d9f14b4a0c475f2a64dd654f8fed.