merge 1207

merge from upstream