Fixing issue in chrome due to strings being replaced at the wrong time.