Updated from commit 7a9ea2189e88eeade5434377c72975d224e0991b.