Make compatible with upstream changes