Updated from commit 99f0a56f638de7613b802c219a3659e7404adb9f.