fix computation for nodes with multiple out edges