Wrong values passed to pathfind