fixes pre_replace \e issue