Revert "Sync core with upstream"

This reverts commit beaa2f2d8c92156b6c67104a205af5c754525f62.