fixing replacement bug