bugfix on detecting modules