private void fixCorrespondingGates(Graph<Vertex,Edge> g) {
		TreeMap<String, Integer> scoreTallyOut = new TreeMap<String, Integer>();
		TreeMap<String, Integer> scoreTallyIn = new TreeMap<String, Integer>();
		LinkedList<String> gateways = new LinkedList<String>();
		
		KShortestPaths<Vertex, Edge> sp = new KShortestPaths<Vertex, Edge>(g, g.trueStart, MAX_PATH_LENGTH);
		for(GraphPath<Vertex, Edge> gp : sp.getPaths(g.trueEnd)){
			// Walk along paths keeping score of open and close gateways
			Vertex start = gp.getStartVertex();
			Vertex end = gp.getEndVertex();
			Vertex current = start;
			//System.err.println("Viewing current path " + gp);
			//System.err.println("Starting with " + start);
			do{		
				if(current == null) break;
				if(current.type == GraphLoader.ParallelGateway){
					//scoreTallyIn.put(current.name, 0);
					if(g.inDegreeOf(current) > 1){
						// gatway join
						scoreTallyIn.put(current.name, g.inDegreeOf(current));
						gateways.add(current.name);
					}else if(g.outDegreeOf(current) > 1){
						scoreTallyOut.put(current.name, g.outDegreeOf(current));
						gateways.add(current.name);
					}
				}				
				current = next(current, gp,g);
			}while(current != null || current != end);
		}
		
		loopyfix(gateways, scoreTallyIn, scoreTallyOut,g);
		
	}