public function fix($module, $oConfig = null)
    {
        if ($oConfig !== null) {
            $this->setConfig($oConfig);
        }

        $moduleId = $module->getId();

        if (!$this->initialCacheClearDone) {
            //clearing some cache to be sure that fix runs not against a stale cache
            ModuleVariablesLocator::resetModuleVariables();
            if (extension_loaded('apc') && ini_get('apc.enabled')) {
                apc_clear_cache();
            }
            if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
                $this->output->writeln("initial cache cleared");
            }
            $this->initialCacheClearDone = true;
        }
        $this->module = $module;
        $this->needCacheClear = false;
        $this->restoreModuleInformation($module, $moduleId);
        if ($this->needCacheClear){
            $this->resetModuleCache($module);
            $this->output->writeln("cache cleared for $moduleId");
        }
    }