More bug fixes around the module conversion