adapt to upstream changes