fixes to loading modules