Updated from commit c9438ae1a74c7564f98b5c995ccc1a8f212053fd.