merge from 3.0 for fix some bug.