updated: aligned to upstream.