I tested your code but for me it just kept looping round without moving anywhere when I stepped through it.