Updated from commit f12fbc4a3b4ff7a30cea4b484aa6f8ac77763b2b.