fix string:replace fn bug