some fixes in modularity