Fixing map/graph bug