Correcting a bug on barabasi-albert model