minor fixes to handle modularity