Fix issue with modules being references