Fix slight replacement bug.