Fixed replace callback