Before replace operations