fix moving bug when react