Finally fixed that stupid pathfinding bug. Logic error in updating the astar object, damn it