sync with fixes upstream
sync with fixes upstream