fix maxMove bug