fix move grip cannot work in some case.
refactor the code