Correcting Erdos-Renyi Network generation