Fix bugs in players moving.