Taking care of some todos in replace