AI navigation corrected. Should work now. TODO: test it.