Sync with official 1.0.x branch