fix some replacement