Changed nextDirection