fix replace to use /g