Changed sharing logic to check for module