Fixed the AI trying to make illegal jumps