syncing with the latest changes of original repo

since commit 9862309820141c40e9a11dc443dddc144a511ea6
to 3a6aff1f13ed449a83495354ab4f64fdd4939a17