Change replace method for addModule