another bunch of fixes needed to run modules