Trying to fix the bfs of the npcs