fixed modularity problem