sync with upstream 1.1.7