Even more module fixes

Added a sketchy fix to the modules system. It works fine, but really
should be cleaned up at some point....