Fix old modules not being removed