fixed delimiter replace bugs