More fixes to agent ai to prevent going back to the current location