Adapted to upstream change