Corrected order of replacement.