Typescript String Replace Not Working