Fix #3 Avoid loops in ghost movements.