Fixed bug whether modularity has been computed