Corrected bug on hubs calculation