ensure a global replace is done to support deepply nested modules