last re-arrangement
Sync with v3.0.x